<!DOCTYPE html>
<html lang="en" xmlns:v-bind="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <!--v-clock：解决页面闪烁加载问题-->
    <style>
        [v-clock]{
            display: none;
        }
    </style>
</head>
<body>
<div id="vue" v-clock>
 <div>{{info.name}}</div>
 <div>{{info.address.city}}</div>
 <a v-bind:href="info.url">点我跳转链接</a>
</div>
<!--导入vue.js-->
<script src="https://cdn.jsdelivr.net/npm/vue@2/dist/vue.js"></script>
<script src="https://unpkg.com/axios/dist/axios.min.js"></script>
<script type="text/javascript">
  var vm = new Vue({
    el: "#vue",
    data(){
      return{
        // 请求的返回参数格式必须和json字符串一样
        info:{
            name:null,
          address:{
                street:null,
                city:null,
                country:null
          },
          url: null
        }
      }
    },
    mounted(){  //钩子函数   链式编程
        axios.get('../data.json').then(response=>(this.info=response.data));
    }
  });
</script>
</body>
</html>